﻿@model IEnumerable<MvcApplication1.Models.Task>

@{
    ViewBag.Title = "Index";
}



<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table  class="table table-bordered" style="width:1000px; margin:auto; ">
    <tr class="active" style="font-weight:bold;">
        <th>
            @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Priority)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Date)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Status)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Priority)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
                <div class="btn-group">
  <button type="button" class="btn btn-default btn-sm"> @Html.DisplayFor(modelItem => item.Status)</button>
  <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="#">New</a></li>
      <li class="divider"></li>
    <li><a href="#">Running</a></li>
    <li><a href="#">Done</a></li>
    
  </ul>
</div>
           
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
